package com.c1.client.menu.support;

import com.c1.client.menu.MenuManager;
import com.c1.client.menu.item.MItem;
import com.c1.client.pan.Pan;
import com.c1.client.pan.Pans;
import com.s.S;
import com.s.core.root.CaseA;

import java.util.Collections;

public abstract class SwitchCaseSupport extends MItem {
    public abstract boolean isNext();

    @Override
    public void process() {
        Pan currentPan = Pans.me().getCurrentPan();
        CaseA c = S.serverData.strategyCase(currentPan.code(true), currentPan.date(true), isNext());
        MenuManager.me().showStocksByCodes(Collections.singletonList(c.code), c.date);
    }

    @Override
    public boolean needCodePics() {
        return false;
    }
}
